#include <string>

#include "api/TimingEngine.hh"
#include "api/TimingIDBAdapter.hh"
#include "builder.h"
#include "contest_coord.h"
#include "def_service.h"
#include "lef_service.h"
#include "IdbInstance.h"
#include "contest_net.h"
#include "Grids.h"
//#include "IdbGCellGrid.h"

namespace ieda_contest {
class ContestDataManager;

class myContestEvaluation
{
 public:
  myContestEvaluation(ContestDataManager* data_manager);
  ~myContestEvaluation() = default;

  bool doEvaluation();
  
  ContestDataManager* _data_manager = nullptr;
  ista::TimingEngine* _timing_engine = nullptr;

  void makeLayerInfo();
  void makeGCellInfo();
  void makeInstanceList();
  ContestCoord getGCellCoord(const ContestCoord& coord);
  void makeNetList();
  bool overlapCheckPassed();
  bool connectivityCheckPassed();
  bool overflowCheckPassed();
  void printInstanceArea();
  void printWnsAndTNS();

  void makeGridList();
  void makeRelativeNetsMap();
};

} // namespace ieda_contest
